#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void MP(int arr[], int n)
{
	int i = 0;
	int j = 0;
	for (i = 0; i < n - 1; i++)
	{
		int flag = 0;
		for (j = 0; j < n - 1 - i; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				int flag = 1;
				int tmp = 0;
				tmp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = tmp;
			}
		}
		if (flag = 0)
		{
			break;
		}
	}

}
int main()
{
	int arr[10] = { 3,1,2,5,4,8,7,9,0,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	MP(arr, sz);
	int m = 0;
	for (m = 0; m < sz; m++)
	{
		printf("%d ", arr[m]);
	}
	return 0;
}